package com.chanta.server.persistence;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

/**
 * TODO Please comment this class..
 * 
 * @author Hakan Özdemir - Vendoo Inc.
 * @date 02.11.2013
 * 
 */
@PersistenceCapable
public class Message {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	/** do not rename */
	@Persistent
	private User owner;

	@Persistent
	private User receiver;

	@Persistent
	private Date sendDate;

	@Persistent
	private String status;

	@Persistent
	private String messageText;

	/**
	 * Getter for owner.
	 * 
	 * @return owner
	 */
	public User getOwner() {
		return owner;
	}

	/**
	 * Setter for owner.
	 * 
	 * @param owner
	 *            the owner to set
	 */
	public void setOwner(User owner) {
		this.owner = owner;
	}

	/**
	 * Getter for receiver.
	 * 
	 * @return receiver
	 */
	public User getReceiver() {
		return receiver;
	}

	/**
	 * Setter for receiver.
	 * 
	 * @param receiver
	 *            the receiver to set
	 */
	public void setReceiver(User receiver) {
		this.receiver = receiver;
	}

	/**
	 * Getter for sendDate.
	 * 
	 * @return sendDate
	 */
	public Date getSendDate() {
		return sendDate;
	}

	/**
	 * Setter for sendDate.
	 * 
	 * @param sendDate
	 *            the sendDate to set
	 */
	public void setSendDate(Date sendDate) {
		this.sendDate = sendDate;
	}

	/**
	 * Getter for status.
	 * 
	 * @return status
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * Setter for status.
	 * 
	 * @param status
	 *            the status to set
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * Getter for messageText.
	 * 
	 * @return messageText
	 */
	public String getMessageText() {
		return messageText;
	}

	/**
	 * Setter for messageText.
	 * 
	 * @param messageText
	 *            the messageText to set
	 */
	public void setMessageText(String messageText) {
		this.messageText = messageText;
	}
}
